<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #app {
            width: 40px;
            height: 40px;
            border: 1px solid black;
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <div id="app"></div>
    <div>
        <button class='box1'>按钮1</button>
        <button class="box2">按钮2</button>
        <button class="box3">按钮3</button>
        <button class="box4">按钮4</button>
        <button class="box5">按钮5</button>
    </div>
</body>

</html>
<script src="./jquery-1.11.1.js"></script>
<script>
    $(".box1").on('click', function() {
        $('#app').css('width', '300px')
    })
    $(".box2").on('click', function() {
        $('#app').css('width', '200px')
    })
    $(".box3").on('click', function() {
        $('#app').css('width', '100px')
    })
    $(".box4").on('click', function() {
        $('#app').css('width', '400px')
    })
    $(".box5").on('click', function() {
        $('#app').css('width', '500px')
    })
</script>